package cac.fenjian.resource.materialreceipt.util;

import cac.fenjian.resource.materialreceipt.dao.AsyncLogDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;

@Component
public class AsyncLog {
    @Autowired
    private AsyncLogDao asyncLogDao;

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public int insertAsyncLog(HashMap map){
        return asyncLogDao.insertAsyncLog(map);
    }

    public int updateAsyncLogExe(HashMap map){
        return asyncLogDao.updateAsyncLogExe(map);
    }

    public int updateAsyncLogFinish(HashMap map){
        return asyncLogDao.updateAsyncLogFinish(map);
    }
}
